package com.ydlclass;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 获取日期工具类
 * @Author duWenJian
 * @Date 2024/2/22 15:55
 * @Version 1.0
 */
public class DateUtils {
    public static Date get(String date){
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        try {
            return dateFormat.parse(date);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return null;
    }
}
